
{{template "base.html" .}}

{{define "content"}}
<script>
    $(".stu_booking").addClass("layui-this")//设置左侧导航栏
</script>
<div id="Booking-box">
    <div class="Booking-box-textRow layui-row layui-col-space20">
        <div class="layui-col-md12 Booking-box-text">
            我的预约
        </div>
    </div>
    <div class="Booking-box-row layui-row layui-col-space20">
        <div id="Booking-box-right" class="layui-col-md12">
            <table id="bookingTable"></table>
            <script>
                layui.use('table', function(){
                    var table = layui.table;
                    table.render({
                        elem: '#bookingTable',
                        url: 'http://127.0.0.1:8080/student/getBooking/'+getCookie("Id"), //数据接口,
                        limit: 15,
                        height: 'full-120',
                        cols: [[
                            { field: 'Id', title: '编号', width: 88, sort: true, align: 'center' },
                            { field: 'StudentName', title: '学生', width: 120, align: 'center' },
                            { field: 'TeacherName', title: '教师', width: 120, align: 'center' },
                            { field: 'Place', title: '地点', align: 'center' },
                            { field: 'StateName', title: '状态', width: 120, align: 'center' },
                            { field: 'Content', title: '内容', align: 'center' },
                            { field: 'BookingTime', title: '预约时间', width: 180, align: 'center' },
                            { field: 'StringTime', title: '创建时间', width: 180, align: 'center' },
                        ]]
                    });
                });
            </script>
        </div>
    </div>
</div>
<style>
    #Booking-box{
        padding: 5%;
        height: 500px;
    }
    .Booking-box-row,#Booking-box-left,#Booking-box-right{
        height: 100%;
    }
    #Booking-box-left{

    }
    #Booking-box-right{

    }
</style>
{{end}}
